package com.such.kit.database.primarykey.impl;

import java.util.UUID;
import com.such.kit.database.primarykey.PrimaryKeyGenerator;
import com.such.kit.string.StringCommons;

/**
 * @作者 SUCH
 * @日期 2017-7-10 下午4:52:18
 * @描述 UUID 主键生成器
 */
public class UUIDPKGenerator implements PrimaryKeyGenerator {

	public String pkValue() {
		return UUID.randomUUID().toString();
	}

	public String pkField(String alias) {
		return StringCommons.merger("'", UUID.randomUUID().toString(), "' as ", alias);
	}

}
